package lanbmda;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(10 - i);
        }
        list.forEach(System.out::print);
        System.out.println();
        list.sort((o1, o2) -> o2 - o1);
        list.forEach(System.out::print);
        System.out.println();
        list.sort((o1, o2) -> o1 - o2);
        list.forEach(System.out::print);
        System.out.println();
    }
}
